#ifndef DATAINIT_H
#define DATAINIT_H
//新建一个线程类
#include <QThread>
#include <QEventLoop>
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QFile>
#include <QFileInfo>
#include <QTextCodec>
#include <QByteArray>

class DataInit : public QThread
{
    Q_OBJECT

public:
    DataInit();
    QString getHtml(QString URLSTR);
    void run();
    //重写run()函数，调用时使用start();
    QString CheckFileMD5(QString path);
    bool CheckSysMD5();
    QString Unicode2string(QString str);
signals:
    void InitFinished();
    void InitFail();

public:
    QString metadata_B_md5,metadata_G_md5,Ud_B_md5,Ud_G_md5,Ue_B_md5,Ue_G_md5,lanuch_B_md5,lanuch_G_md5;
    QString type;
    QString cps;
    QString channel;
    QString sub_channel;
    QString game_install_path;
    QString is_user_update;
    QString new_version;
    QString game_dynamic_bg_name;
    QString is_first_exit;
    QString exit_type;
    QString is_auto_update;
    QString game_dynamic_bg_md5;
    QString game_version;
};

#endif // DATAINIT_H
